 namespace s = "http://www.ascc.net/xml/schematron"
 
 book-element =
   [
     s:rule [
       context = "book"
       s:assert [
         test = "@id = concat('b', isbn)"
         ' The id needs to be the isbn number prefixed by "b" '
       ]
     ]
   ]
   element book {
     attribute id { text },
     attribute available { text },
     isbn-element,
     title-element,
     author-element*,
     character-element*
   }
 start = element library { book-element+ }
 author-element =
   element author {
     attribute id { text },
     name-element,
     born-element,
     dead-element?
   }
 born-element = element born { text }
 character-element =
   element character {
     attribute id { text },
     name-element,
     born-element,
     qualification-element
   }
 dead-element = element dead { text }
 isbn-element = element isbn { text }
 name-element = element name { text }
 qualification-element = element qualification { text }
 title-element =
   element title {
     attribute xml:lang { text },
     text
   }
